<h2 class="contentTitle">表单验证</h2>


<div class="pageContent">
	
	<form method="post" action="{:U('Listinfo/editAction')}?callbackType=closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<div class="pageFormContent nowrap" layoutH="97">

			<dl>
				<dt>用户名：</dt>
				<dd>
					<input type="text" name="title" maxlength="20" class="required" value="{$result.title}"/>
					<span class="info">用户名</span>
				</dd>
			</dl>
			<dl>
				<dt>内容：</dt>
				<dd>
					<input type="text" name="content" maxlength="20" class="required" value="{$result.content}"/>
					<span class="info">内容</span>
				</dd>
			</dl>
			<dl>
				<dt>推荐类型：</dt>
				<dd>
					<foreach name="info" item="vo" key="k">
					<!-- 注意下面的name和value值的书写 -->
						<in name="vo.id" value="$result.recommend_id">
							<input  checked="checked" type="checkbox" name="choose[]"  value="{$vo.id}"/>{$vo.name}
						<else/>
							<input type="checkbox" name="choose[]" value="{$vo.id}"/>{$vo.name}
						</in>
					</foreach>
				</dd>
			</dl>
			<dl>
				<dt>商品链接：</dt>
				<dd>
					<input type="text" name="url" maxlength="20" class="required" value="{$result.url}"/>
					<span class="info">商品链接</span>
					<input type="hidden" name="id" value="{$result.id}"/>
				</dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>


<script type="text/javascript">
function customvalidXxx(element){
	if ($(element).val() == "xxx") return false;
	return true;
}
</script>
